<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsHotsearchTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('hotsearch', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键id');
			$table->string('title', 100)->comment('搜索标题');
			$table->integer('counts')->nullable()->default(1)->comment('搜索次数');
			$table->integer('last_time')->comment('最后一次搜索时间');
			$table->tinyInteger('type')->nullable()->default(0)->comment('搜索类型0为未定义1为书籍2为吧3为作者');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('hotsearch');
	}

}
